package gui;

import java.awt.Dimension;

import javax.swing.*;

/**
 * @author Wojciech Łopata
 *
 */

public class GameMessagePanel extends JPanel
{
	private static final long serialVersionUID = -6511701610118782355L;
	private final JTextField messageField;
	public GameMessagePanel()
	{
		messageField = new JTextField();
		messageField.setEditable(false);
		messageField.setHorizontalAlignment(JTextField.CENTER);
		messageField.setPreferredSize(new Dimension(200, 35));
		add(messageField);
	}
	
	public void setMessage(String msg)
	{
		if(msg != null) messageField.setText(msg);
	}
}
